unit DFrame.Logger;

{*
  port from slf4j.org
*}

interface

uses
  SysUtils, Generics.Collections;


type

  ILogger = interface;
  ILoggerFactory = interface;

  ILogger = interface
    ['{60E85E2F-B4DB-4116-9700-6B39825F97C6}']

    function getName(): String;

    function isTraceEnabled():boolean; overload;
    procedure trace(const msg:String); overload;
    procedure trace(const format: String; const argArray: array of const); overload;
    procedure trace(const msg: String; const t: Exception); overload;

    function isDebugEnabled() : boolean; overload;
    procedure debug(const msg: String); overload;
    procedure debug(const format: String; const argArray : array of const); overload;
    procedure debug(const msg: String; const t: Exception); overload;

    function isInfoEnabled() : boolean; overload;
    procedure info(const msg: String); overload;
    procedure info(const format: String; const argArray:array of const); overload;
    procedure info(const msg: String; const t: Exception); overload;

    function isWarnEnabled() : boolean; overload;
    procedure warn(const msg: String); overload;
    procedure warn(const format: String; const argArray:array of const); overload;
    procedure warn(const msg: String; const t: Exception); overload;

    function isErrorEnabled() : boolean; overload;
    procedure error(const msg: String); overload;
    procedure error(const format: String; const argArray:array of const); overload;
    procedure error(const msg: String; const t: Exception); overload;

  end;

  ILoggerFactory = interface
    ['{535D81AB-743C-48C7-8B7E-4805FF015B91}']
    function getLogger(name:String):ILogger;
  end;

implementation

end.

